<script setup>
	import { reactive, ref } from 'vue'
	import OrderList from './components/OrderList.vue'

	// 获取页面参数
	const { zhuangtai } = defineProps({
		zhuangtai: String
	})

	const tabs = ['全部', '待付款', '待发货', '待收货', '待评价']

	function 点tab(e) {
		if (current.value !== e.currentIndex) {
			current.value = e.currentIndex
		}
	}
	const current = ref(0)
	const activeColor = '#007aff'
	const styleType = 'button'
</script>

<template>
	<view class="page">
		<view class="">
			<uni-segmented-control :current="current" :values="tabs" :style-type="styleType" :active-color="activeColor"
				@clickItem="点tab" />
		</view>
		<view class="content">
			<view v-for="(item,index) in tabs" :key="item">
				<OrderList v-if="index==current" :状态="item" />
			</view>
		</view>
	</view>
</template>

<style lang="scss">

</style>